package com.yoyo.itravel.bean;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Description 用户实体类
 *
 * @author HZX
 * @date 2020/5/3 16:02
 */
public class User implements Serializable {

    private String userId; // 用户id
    private String nickName; // 昵称
    private String password; // 密码
    private String gender; // 性别
    private String phone; // 电话号码
    private String email; // 邮箱
    private String birthday; // 出生日期
    private String liveAddress; // 居住地址
    private String detailLiveAddress; // 详细居住地址
    private String headImg; // 用户头像
    private String signature; // 个性签名
    private Integer status; // 用户账号状态(0:不可用，1:可用)
    private Date registerTime; // 用户注册时间
    private Integer onlineStatus; // 用户登录状态
    private Date updateTime; // 用户最后一次修改信息时间

    private List<Role> roles; // 用户对应的角色集合

    private List<Permission> permissions; // 用户对应的权限集合

    private List<Sight> collectSights; // 用户收藏的景点

    public User() {
    }

    /* 全参构造 */
    public User(String userId, String nickName, String password, String gender, String phone, String email, String birthday, String liveAddress, String detailLiveAddress, String headImg, String signature, Integer status, Date registerTime, Integer onlineStatus, Date updateTime, List<Role> roles, List<Permission> permissions, List<Sight> collectSights) {
        this.userId = userId;
        this.nickName = nickName;
        this.password = password;
        this.gender = gender;
        this.phone = phone;
        this.email = email;
        this.birthday = birthday;
        this.liveAddress = liveAddress;
        this.detailLiveAddress = detailLiveAddress;
        this.headImg = headImg;
        this.signature = signature;
        this.status = status;
        this.registerTime = registerTime;
        this.onlineStatus = onlineStatus;
        this.updateTime = updateTime;
        this.roles = roles;
        this.permissions = permissions;
        this.collectSights = collectSights;
    }

    public User(String userId, String nickName, String password, String phone, Date registerTime) {
        this.userId = userId;
        this.nickName = nickName;
        this.password = password;
        this.phone = phone;
        this.registerTime = registerTime;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getLiveAddress() {
        return liveAddress;
    }

    public void setLiveAddress(String liveAddress) {
        this.liveAddress = liveAddress;
    }

    public String getDetailLiveAddress() {
        return detailLiveAddress;
    }

    public void setDetailLiveAddress(String detailLiveAddress) {
        this.detailLiveAddress = detailLiveAddress;
    }

    public String getHeadImg() {
        return headImg;
    }

    public void setHeadImg(String headImg) {
        this.headImg = headImg;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public List<Role> getRoles() {
        return roles;
    }

    public void setRoles(List<Role> roles) {
        this.roles = roles;
    }

    public List<Sight> getcollectSights() {
        return collectSights;
    }

    public void setcollectSights(List<Sight> collectSights) {
        this.collectSights = collectSights;
    }

    public Integer getOnlineStatus() {
        return onlineStatus;
    }

    public void setOnlineStatus(Integer onlineStatus) {
        this.onlineStatus = onlineStatus;
    }

    public List<Permission> getPermissions() {
        return permissions;
    }

    public void setPermissions(List<Permission> permissions) {
        this.permissions = permissions;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId='" + userId + '\'' +
                ", nickName='" + nickName + '\'' +
                ", password='" + password + '\'' +
                ", gender='" + gender + '\'' +
                ", phone='" + phone + '\'' +
                ", email='" + email + '\'' +
                ", birthday='" + birthday + '\'' +
                ", liveAddress='" + liveAddress + '\'' +
                ", detailLiveAddress='" + detailLiveAddress + '\'' +
                ", headImg='" + headImg + '\'' +
                ", signature='" + signature + '\'' +
                ", status=" + status +
                ", registerTime=" + registerTime +
                ", onlineStatus=" + onlineStatus +
                ", updateTime=" + updateTime +
                ", roles=" + roles +
                ", permissions=" + permissions +
                ", collectSights=" + collectSights +
                '}';
    }
}
